<?
session_start();

$_SESSION['username'] = "";

?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Busqueda Productos</title>
<link href="../../css/igym.css" rel="stylesheet" type="text/css" />
</head>
    
    <link rel="stylesheet" href="../../css/validationEngine.jquery.css" type="text/css"/>
    <link rel="stylesheet" href="../../css/template.css" type="text/css"/>
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript">
    </script>
    <script src="../../js/languages/jquery.validationEngine-es.js" type="text/javascript" charset="utf-8">
    </script>
    <script src="../../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8">
    </script>
    <link type="text/css" href="../../css/custom-theme/jquery-ui-1.8.11.custom.css" rel="stylesheet" />

    <script language="javascript" type="text/javascript" src="../../js/jquery-ui-1.8.11.custom.min.js"></script>

    
<script type="text/javascript" src="../../js/jquery-1.2.1.pack.js"></script>
   <script type="text/javascript">
        function requestCustomerInfo() {
            var string = document.getElementById("txtCustomerId").value;
            top.frames["hiddenFrame"].location = "buscausuarios.php?value=" + string;
        }
        
        function displayCustomerInfo(sText) {
            var divCustomerInfo = document.getElementById("divCustomerInfo");
            divCustomerInfo.innerHTML = sText;
        }
    </script>

<script type="text/javascript">
$(document).ready(function(){
            //codigo para google map
            //codigo para el menu
            $('ul li:has(ul)').hover(
            function(e)
            {
                $(this).find('ul').slideDown();
            },
            function(e)
            {
                $(this).find('ul').slideUp();
            }
        );
            //codigo para el menu

            // codigo para los botones
            $( "button, input:submit", "#login" ).button();
        }
    )



function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
			$.post("../../php/libreria/Dao/BusquedaUsuario.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		$('#txtCustomerId').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}
</script>

<style type="text/css">
	body {
		font-family: Helvetica;
		font-size: 11px;
		color: #000;
	}
	
	h3 {
		margin: 0px;
		padding: 0px;	
	}

	.suggestionsBox {
		position: relative;
		left: 30px;
		margin: 10px 0px 0px 0px;
		width: 200px;
		background-color: #212427;
		-moz-border-radius: 7px;
		-webkit-border-radius: 7px;
		border: 2px solid #000;	
		color: #fff;
	}
	
	.suggestionList {
		margin: 0px;
		padding: 0px;
	}
	
	.suggestionList li {
		
		margin: 0px 0px 3px 0px;
		padding: 3px;
		cursor: pointer;
	}
	
	.suggestionList li:hover {
		background-color: #659CD8;
	}
</style>

</head>

<body>
   
    
 <table  cellspacing=""  cellpadding="0" align="center">
            <tr>
                <td>
                    <div id="headerban">
                        <img src="../../images/Logo_big.png" width="114" height="119" />
                    </div>
                </td>
                <td>
                    <div id="header">
                        <div id="login">
                            <?
                            if ($_SESSION["username"] == null || $_SESSION["username"] == "")
                                include("../partes/loginform.php");
                            ?>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="0" align="center">
            <tr>
                <td>
                    <div  id="menu">
                        <ul>
                            <li><a href="#">Productos</a>
                                <ul>
                                    <li><a href="#">Alta</a></li>
                                    <li><a href="#">Baja</a></li>
                                    <li><a href="#">Cambios</a></li>
                                    <li><a href="#">Consulta</a></li>
                                </ul>
                            </li>
                            <li><a href="#">Cuenta</a>
                                <ul>
                                    <li onclick="irRegistro()"><a>Registro</a></li>
                                    <li><a href="../partes/registroform.php">Mi cuenta</a></li>
                                    
                                </ul>
                            </li>
                            <li><a href="#">Carrito</a>
                                <ul>
                                    <li><a href="../cart/catalogoproductos.php">Ir carrito</a></li>
                                    

                                </ul>
                            </li>
                            <li><a href="#">Empresa</a>
                                <ul>
                                    <li><a>Historia</a></li>
                                    <li><a href="">Mision y Vision</a></li>
                                    <li><a href="">Contactanos</a></li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
       
    
    
    

	<div>
            <br></br>

            <table align="center" border="2">
                <tr>
                    <td>
                        <h2>Buscar usuarios</h2>
    <p>Escriba el usuario a buscar:</p>
    <p>Username: </p>
    <input align="center" type="text" size="30" value="" id="txtCustomerId" onkeyup="lookup(this.value);" onblur="fill();" />
    <p><input type="button" value="Obtener informacion del producto" onclick="requestCustomerInfo()" /></p>
    
    
    <div id="divCustomerInfo"></div>
    <iframe src="about:blank" name="hiddenFrame" width="0" height="0" frameborder="0"></iframe>
            
                    
	       <div>
				
			
			<div class="suggestionsBox" id="suggestions" style="display: none;">
                            <img src="../../images/upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
				<div class="suggestionList" id="autoSuggestionsList">
					&nbsp;
				</div>
			</div>
                                         
                         </input>
    
		
    
	</div>
    </td>
    </tr>
</table>       
</body>
</html>

